partitioning 您所在的位置:网站首页 partition inspector partitioning

partitioning

#partitioning| 来源: 网络整理| 查看: 265

Intel-based Macs require your boot drive to use the more modern GUID Partition Table (GPT) rather than the legacy Master Boot Record (MBR) to keep track of how the hard drive has been partitioned. For compatibility with OSes that aren't GPT-savvy, drives that use the GPT still have a Pseudo MBR (PMBR) that basically mirrors the information that's in the GPT.

It's important that the tools you use to repartition your hard drive or otherwise edit your GPT or your PMBR keep them both in sync. If they get out of sync, then any non-GPT-savvy tools will just look at the PMBR and give one view of how the drive is partitioned, and the GPT-savvy tools will look at the GPT and give a different view of how the drive is partitioned.

Different tools for different OSes tend to focus on certain partition types they know best, and may not accurately report the partition type for other partitions if it's not a type they recognize. Or they might just outright omit listing unrecognized partitions. Adding to the difficulty, Mac OS X's Disk Utility won't show you certain kinds of partitions it knows about, such as Mac OS X recovery partitions.

From within Mac OS X, to get a quick view of the connected hard drives and volumes it knows about, you can use

diskutil list

To see a more detailed, low-level view of the contents of the drive's GPT, use:

sudo gpt -r show /dev/disk0 sudo gpt -r show -l /dev/disk0

Replace /dev/disk0 with the path to the device special file for the disk in question, if needed. The first version of the command shows the partition/volume type identifiers (a bunch of long GUIDs you can look up here). The second version of the command shows the volume labels (names). I usually like to see the output of both of those, so I can match up volume names to types.

To see what's in your PMBR, try:

sudo fdisk /dev/disk0

On my current machine, the fdisk output indicates that my PMBR thinks my drive is just one big partition of a type fdisk doesn't recognize, even though gpt shows that I have several different HFS+ and Mac OS X recovery partitions. I presume that if I had ever Boot Camped this drive, or used rEFIt on it, that the PMBR would know the specifics of some of the partitions, rather than showing the drive as one big chunk.

Update your Question with the output of those diskutil, gpt, and fdisk commands, and we may be able to help you even more.

Oh, and to get rid of the unwanted partition, just use Mac OS X's Disk Utility to delete it, and then grow the partition "above" it in Disk Utility's display into the space it was using.

Update: gpt show on my system doesn't have that output line about the suspicious MBR, so it makes me wonder what's suspicious about yours. Perhaps it's just the fact that you still have GRUB bootloader code in your MBR, whereas typical Mac GPT PMBR's don't have any boot code in them at all.

Also, I'd forgotten that the EFI System Partition is technically FAT32 (even though it's given a special GUID). I wonder if there's something about your MBR (like the presence of GRUB), or some contents of your EFI System Partition, that is making your Mac's EFI bootROM see it as a Windows partition instead of just being an EFI System Partition.

To inspect your EFI system partition, you can force Mac OS X to mount it like this:

sudo mkdir /mnt sudo mount -t msdos /dev/disk0s1 /mnt

My EFI partition basically just contains:

/EFI /APPLE /EXTENSIONS /FIRMWARE

...plus the update files from the last EFI firmware update I installed on this machine, as well as some typical Mac OS X turd files like .Trashes/. It would be interesting to know what your EFI system partition has in it.

The other notable difference between your system and mine is that rEFIt's Partition Inspector reports my MBR boot code as "None", whereas you have GRUB in yours. I wonder if forcing Disk Utility to touch your partition tables—like by slightly shrinking, then regrowing, your main HFS+ partition—would force the MBR to get touched, the the GRUB code to be overwritten (zeroed out).



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有